package cn.iocoder.yudao.module.member.convert.images;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.member.api.images.uto.ImagesDOVO;
import cn.iocoder.yudao.module.member.controller.admin.images.vo.ImagesCreateReqVO;
import cn.iocoder.yudao.module.member.controller.admin.images.vo.ImagesExcelVO;
import cn.iocoder.yudao.module.member.controller.admin.images.vo.ImagesRespVO;
import cn.iocoder.yudao.module.member.controller.admin.images.vo.ImagesUpdateReqVO;
import cn.iocoder.yudao.module.member.controller.admin.user.vo.ImageUserVO;
import cn.iocoder.yudao.module.member.dal.dataobject.images.ImagesDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 用户图片 Convert
 *
 * @author 芋道源码
 */
@Mapper
public interface ImagesConvert {

    ImagesConvert INSTANCE = Mappers.getMapper(ImagesConvert.class);
    @Mappings(value={
            @Mapping(target = "thirdId",source = "userId")})
    ImagesDO convert(ImagesCreateReqVO bean);

    ImagesDO convert(ImagesUpdateReqVO bean);
    @Mappings(value={
            @Mapping(target = "type",source = "imageType")})
    ImagesCreateReqVO convert(ImageUserVO bean);

    ImagesRespVO convert(ImagesDO bean);

    List<ImagesRespVO> convertList(List<ImagesDO> list);
    @Mappings(value={
            @Mapping(target = "type",source = "imageType")})
    List<ImagesDO> convertList5(List<ImageUserVO> list);
    @Mappings(value={
            @Mapping(target = "type",source = "imageType")})
    ImagesDO convertList5(ImageUserVO imageUserVO);

    List<ImagesDO> convertList6(List<ImagesDOVO> list);

    List<ImageUserVO> convertList3(List<ImagesDO> list);
    @Mappings(value={
            @Mapping(target = "imageType",source = "type")})
    ImageUserVO convertList3(ImagesDO imagesDO);

    PageResult<ImagesRespVO> convertPage(PageResult<ImagesDO> page);

    List<ImagesExcelVO> convertList02(List<ImagesDO> list);
}
